#include "stdafx.h"
#include "./camera.h"

Camera::Camera(Size size, float depth)
{
	glMatrixMode(GL_PROJECTION);
	glLoadIdentity();

	glOrtho (0, size.cx, 0, size.cy, -depth, depth);

	glMatrixMode(GL_MODELVIEW);
	glLoadIdentity();
}

Camera::~Camera()
{

}

//void Camera::SetCamera()
//{
	//3d test
	//glRotatef(-45, 1, 0, 0);
	//glTranslatef(0, 30, 0);

	//Lib3dsCamera* p3dsCamera = NULL;

	//for (int i = 0; i < m_pFile->ncameras; ++i)
	//{
	//	p3dsCamera = m_pFile->cameras[i];
	//	break;
	//}

	//if (!p3dsCamera)
	//	return;

	//glMatrixMode(GL_PROJECTION);
	//glLoadIdentity();
	//gluPerspective(p3dsCamera->fov, m_fAspect, p3dsCamera->near_range, p3dsCamera->far_range);

	//glMatrixMode(GL_MODELVIEW);
	//glLoadIdentity();

	//gluLookAt(p3dsCamera->position[0], p3dsCamera->position[1], p3dsCamera->position[2],
	//		  p3dsCamera->target[0], p3dsCamera->target[1], p3dsCamera->target[2],
	//		  0.0, 0.0, 1.);
//}